# Definition for singly-linked list.
# class ListNode(object):
#     def __init__(self, x):
#         self.val = x
#         self.next = None
'''
lst = []

for i in range(2, 100):
    for j in range(2, i):
        if i % j == 0:
            break
    else:
        lst.append(i)

print(lst)
'''

class Fibonacci(object):
    def __init__(self, num):
        self.first = 0
        self.second = 1
        self.num = num

    def generate_fibo(self):
        for i in range(self.num):
            yield self.first
            self.first, self.second = self.second, self.first + self.second

print(list(Fibonacci(10).generate_fibo()))


def quickSort(arr, _l, _r):
    l, r, t = _l, _r, 0
    if l <= r:
        t = arr[_l]
        while l < r:
            if l < r and arr[r] >= t:
                r = r - 1
            arr[l] = arr[r]
            if l < r and arr[l] <= t:
                l = l + 1
            arr[r] = arr[l]
        arr[r] = t
        quickSort(arr, _l, l-1)
        quickSort(arr, l+1, _r)

i=[23,1,6,77,8,-11,100,11.1,99,24,21]
quickSort(i,0,len(i)-1)
# print(i)


# import socket
#
# s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# s.bind(())
# s.listen()
# conn, addr = s.accept()
# s.recv()
# s.send()
# s.close()
#
# socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# s.connect()
# s.send()
# s.recv()
# s.colse()

a = [1,2,3,4,3]
a.remove(3)
print(a)